using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._LocationReferencingTools
{
    /// <summary>
    /// <para>Derive Event Measures</para>
    /// <para>Populates and updates the DerivedRouteID field and measure values on point and line events with those fields configured and enabled.</para>
    /// <para>填充和更新 DerivedRouteID 字段，并在配置和启用这些字段的情况下测量点和线事件的值。</para>
    /// </summary>    
    [DisplayName("Derive Event Measures")]
    public class DeriveEventMeasures : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DeriveEventMeasures()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_route_features">
        /// <para>Input Route Features</para>
        /// <para>The LRS Network containing the events with DerivedRouteID and measure fields configured.</para>
        /// <para>包含配置了 DerivedRouteID 和度量字段的事件的 LRS 网络。</para>
        /// </param>
        public DeriveEventMeasures(object _in_route_features)
        {
            this._in_route_features = _in_route_features;
        }
        public override string ToolboxName => "Location Referencing Tools";

        public override string ToolName => "Derive Event Measures";

        public override string CallName => "locref.DeriveEventMeasures";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_route_features, _update_all_events.GetGPValue(), _event_layers, _out_events, _out_details_file];

        /// <summary>
        /// <para>Input Route Features</para>
        /// <para>The LRS Network containing the events with DerivedRouteID and measure fields configured.</para>
        /// <para>包含配置了 DerivedRouteID 和度量字段的事件的 LRS 网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Route Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_route_features { get; set; }


        /// <summary>
        /// <para>Update all event feature classes registered in the selected network</para>
        /// <para><xdoc>
        ///   <para>Determines whether all event feature classes in the network will be updated.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Updates all events in the network selected in Input Route Features. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Does not update all events in the network selected in Input Route Features. Allows the user to select individual event layers in the event layers parameter below.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定是否将更新网络中的所有事件要素类。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 更新在输入路径要素中选定的网络中的所有事件。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不更新在输入路径要素中选择的网络中的所有事件。允许用户在下面的事件图层参数中选择单个事件图层。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update all event feature classes registered in the selected network")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _update_all_events_value _update_all_events { get; set; } = _update_all_events_value._true;

        public enum _update_all_events_value
        {
            /// <summary>
            /// <para>UPDATE_ALL</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("UPDATE_ALL")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>UPDATE_SOME</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("UPDATE_SOME")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Event Layers</para>
        /// <para>The event layers that will have DerivedRouteID and measure fields updated.</para>
        /// <para>将更新 DerivedRouteID 和测量字段的事件图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Event Layers")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _event_layers { get; set; } = null;


        /// <summary>
        /// <para>Output Events</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Events")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public List<object> _out_events { get; set; }


        /// <summary>
        /// <para>Output Details File</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Details File")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_details_file { get; set; }


        public DeriveEventMeasures SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}